import openpyxl
wb = openpyxl.load_workbook('/Users/zhangxiangbin/招商局资本管理有限责任公司_I017-2022-01-2022-06_2022年1-6月计提账单.xlsx')
ws = wb['汇总']

# Cells can be accessed directly as keys of the worksheet
cell = ws['B9']
print(cell.value)

# Values can be directly assigned
ws['A4'] = 4

# 通过cell()方法获取cell值, row和column的序号从1开始
cell1 = ws.cell(row=9, column=2)
print(cell1.value)

# When a worksheet is created in memory, it contains no cells. They are created when first accessed
# create 100x100 cells in memory, for nothing
for x in range(1, 101):
    for y in range(1, 101):
        ws.cell(row=x, column=y)

